<template>
  <!-- vue2模板 -->
    <ul>
      <li>
        <span>-</span>
        {{item.name}}
        <Item class="son" v-for="v in item.child" :key="v.name" :item="v" />
      </li>
    </ul>
</template>

<script>
export default {
    name: 'Item', // 通过name 组件自调
    components:{},
    data() {
        return {
          title:""
        };
    },
    props:{
      item: {
        type:Object
      }
    },
    mounted() {

    },

    methods: {

    },
};
</script>

<style scoped>
.son{
  margin-left: 20px;
  height: 50px;
  line-height: 50px;
  font-size: 20px;
  color: aquamarine;
}
.son :hover{
  height: 50px;
  line-height: 50px;
  font-size: 20px;
  color: rgb(255, 255, 255);
}
</style>
